package service.impl;

import entity.CommonPairResponse;
import entity.FormSubmitRequest;
import service.FormSubmitHandler;

//@Component
public class FormModelSubmitHandler implements FormSubmitHandler {



    @Override
    public String getSubmitType() { return "model"; }

    @Override
    public CommonPairResponse handleSubmit(FormSubmitRequest request) {
        System.out.println("模型提交：userId="+ request.getUserId()+", formInput="+ request.getFormInput());

        // 模型创建成功后获得模型的 id
        Long modelId = createModel(request);

        return CommonPairResponse.success("模型提交成功！", modelId);
    }

    private Long createModel(FormSubmitRequest request) {
        // 创建模型的逻辑
        return 123L;
    }
}